Operation void
setPriority (int newPriority), in Class Thread
Documentation
* Changes the priority of this thread.
* <p>
* First the <code>checkAccess</code> method of this thread is called
* with no arguments. This may result in throwing a
* <code>SecurityException</code>.
* <p>
* Otherwise, the priority of this thread is set to the smaller of
* the specified <code>newPriority</code> and the maximum permitted
* priority of the thread's thread group.
*
* @exception IllegalArgumentException If the priority is not in the
* range <code>MIN_PRIORITY</code> to
* <code>MAX_PRIORITY</code>.
* @exception SecurityException if the current thread cannot modify
* this thread.
* @see java.lang.Thread#checkAccess()
* @see java.lang.Thread#getPriority()
* @see java.lang.Thread#getThreadGroup()
* @see java.lang.Thread#MAX_PRIORITY
* @see java.lang.Thread#MIN_PRIORITY
* @see java.lang.ThreadGroup#getMaxPriority()
* @since JDK1.0
Concurrency | Sequential | Export Control | PublicAccess |
Property Settings
Java
Final | True | Abstract | False |
Static | False | Native | False |
Synchronized | False | | |